package service;

import beans.UserBean;
import db.UserDAO;

import java.util.List;

public class UserService {
	public boolean login(String account,String password)
	{
		UserDAO userDao=new UserDAO();
		return userDao.valid(account, password);
	}
	public List<UserBean> browse(){
		UserDAO dao =new UserDAO();
		return dao.getAllRecords();
	}
	public boolean addUser(UserBean user)
	{
		UserDAO userDao=new UserDAO();
		return userDao.insertRecord(user);
	}
	


}
